//
//  ButtonView.m
//  eNew
//
//  Created by lanou3g on 15-4-30.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#define k75 75


#import "ButtonView.h"

@implementation ButtonView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addAllViews];
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}


#pragma mark - 添加全部控制器
- (void)addAllViews
{
    self.collectButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_collectButton setImage:[UIImage imageNamed:@"iconfont-shoucang"] forState:UIControlStateNormal];
    _collectButton.frame = CGRectMake(20, 10, k75, 29);
    //_collectButton.backgroundColor = [UIColor magentaColor];
    [self addSubview:_collectButton];
    
    self.shareButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_shareButton setImage:[UIImage imageNamed:@"shar"] forState:UIControlStateNormal];
    _shareButton.frame = CGRectMake(CGRectGetMaxX(_collectButton.frame) + 10, 10, k75, 29);
    //_shareButton.backgroundColor = [UIColor magentaColor];
    [self addSubview:_shareButton];
    
    self.blackButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_blackButton setImage:[UIImage imageNamed:@"yejian"] forState:UIControlStateNormal];
    _blackButton.frame = CGRectMake(CGRectGetMaxX(_shareButton.frame) + 10, 10, k75, 29);
    //_blackButton.backgroundColor = [UIColor magentaColor];
    [self addSubview:_blackButton];
    
    self.reportButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_reportButton setImage:[UIImage imageNamed:@"jubao"] forState:UIControlStateNormal];
    _reportButton.frame = CGRectMake(CGRectGetMaxX(_blackButton.frame) + 10, 10, k75, 29);
    //_reportButton.backgroundColor = [UIColor magentaColor];
    [self addSubview:_reportButton];
    
}


- (void)dealloc
{
    [_collectButton release];
    [_shareButton release];
    [_blackButton release];
    [_reportButton release];
    [super dealloc];
}
@end
